package httpt

import (
	"context"
	"github.com/hyperway/pkg/component"
)

type (
	HttpTransporterLifecycle int
)

func NewHttpTransporterLifecycle() *HttpTransporterLifecycle {
	return new(HttpTransporterLifecycle)
}

func (d *HttpTransporterLifecycle) Title() string {
	return "http-transporter"
}

func (d *HttpTransporterLifecycle) OnPrepare() error {
	transporter := newTransporter()
	component.RegisterTransporter(transporter)
	return nil
}

func (d *HttpTransporterLifecycle) OnDestroy(ctx context.Context) error {
	return nil
}
